<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%blacklist}}".
 *
 * @property integer $id
 * @property string $ip_address
 * @property string $time
 * @property string $username
 */
class Blacklist extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%blacklist}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['time'], 'required'],
            ['ip_address','unique'],
            ['username','unique'],
            [['ip_address'], 'string', 'max' => 50],
            [['time'], 'string', 'max' => 100],
            [['username'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ip_address' => 'Ip Address',
            'time' => 'Time',
            'username' => 'Username',
        ];
    }
}
